function out = filter_treshold(img,min,max)
%% Threshold function
below = img(:,:) < min;
above = img(:,:) > max;
img(:,:) =1; % set all values to 1
img(below)=0; % zero values below
img(above)=0; % zero values above

out = img;
end